function memberDetailTbody(list) {
    var str = '';
    var role=window.localStorage.getItem('role')
    var dp=["撤销",'增加','投注','核销'];
    for(var i=0; i<list.length; i++){
        str+='<tr data-id='+list[i].id +' data-token='+ list[i].token +'>' +
            '<td>'+list[i].orderId+'</td>' +
            '<td>' + dp[list[i].dealType] + '</td>' +
            '<td>'+(new Date(list[i].createTime)).format("yyyy-MM-dd hh:mm:ss")+'</td>' +
            '<td>' + (list[i].betAccount) + '</td>' +
            '<td>'+list[i].betInfo+'</td>' +
            '</tr>'
    }

    return str
}

function pageInit(requestData) {

    $.restPost('/deal/doGetDealAccount',requestData).done(function (msg,data) {

        // console.log(msg,data)

        $("#memberPage-table tbody").html(memberDetailTbody(data.list))


        //显示分页
        laypage({
            cont: 'page', //容器。
            pages: data.pages, //通过后台拿到的总页数
            curr: requestData.pageNum || 1, //当前页
            skip: true, //是否开启跳页
            skin: 'molv', //皮肤,
            jump: function (obj, first) { //触发分页后的回调
                requestData.pageNum = obj.curr;
                if (!first) { //点击跳页触发函数自身，并传递当前页：obj.curr
                    pageInit(requestData);
                }
            }
        });



    })
}





pageInit({
    uId:$.getUrlLocation(),
    pageNum: 1,
    pageSize:10,
    token: window.localStorage.getItem('token')})
